<?php
namespace plugins\pay\controller;
use cmf\controller\PluginBaseController;
use plugins\pay\lib\Pay;

//支付管理基础控制器
class BaseController extends PluginBaseController
{
    public function _initialize()
    {
        parent::_initialize();
        $data = $this->request->param();
        $notVerify = [ 'noticeurl' , 'index' , 'tuikuan' ];
        
        //判断是否需要登录
        if( !isset( $data [ '_action' ] ) || !in_array( strtolower( $data[ '_action' ] ) , $notVerify ) ){
            $admin = cmf_get_current_admin_id();
            if( !$admin ){
                exit( '非法登入' );
            }
        }
    }
}